/*
 * MIT License
 *
 * Copyright (c) 2023 OrdinaryRoad
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: douyin.proto

// Protobuf Java Version: 3.25.3
package tech.ordinaryroad.live.chat.client.codec.douyin.protobuf;

/**
 * Protobuf type {@code FansClub}
 */
public final class FansClub extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:FansClub)
    FansClubOrBuilder {
private static final long serialVersionUID = 0L;
  // Use FansClub.newBuilder() to construct.
  private FansClub(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private FansClub() {
  }

  @Override
  @SuppressWarnings({"unused"})
  protected Object newInstance(
      UnusedPrivateParameter unused) {
    return new FansClub();
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return Douyin.internal_static_FansClub_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @Override
  protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
      int number) {
    switch (number) {
      case 2:
        return internalGetPreferData();
      default:
        throw new RuntimeException(
            "Invalid map field number: " + number);
    }
  }
  @Override
  protected FieldAccessorTable
      internalGetFieldAccessorTable() {
    return Douyin.internal_static_FansClub_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            FansClub.class, Builder.class);
  }

  private int bitField0_;
  public static final int DATA_FIELD_NUMBER = 1;
  private FansClubData data_;
  /**
   * <code>.FansClubData data = 1;</code>
   * @return Whether the data field is set.
   */
  @Override
  public boolean hasData() {
    return ((bitField0_ & 0x00000001) != 0);
  }
  /**
   * <code>.FansClubData data = 1;</code>
   * @return The data.
   */
  @Override
  public FansClubData getData() {
    return data_ == null ? FansClubData.getDefaultInstance() : data_;
  }
  /**
   * <code>.FansClubData data = 1;</code>
   */
  @Override
  public FansClubDataOrBuilder getDataOrBuilder() {
    return data_ == null ? FansClubData.getDefaultInstance() : data_;
  }

  public static final int PREFERDATA_FIELD_NUMBER = 2;
  private static final class PreferDataDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<
        Integer, FansClubData> defaultEntry =
            com.google.protobuf.MapEntry
            .<Integer, FansClubData>newDefaultInstance(
                Douyin.internal_static_FansClub_PreferDataEntry_descriptor,
                com.google.protobuf.WireFormat.FieldType.INT32,
                0,
                com.google.protobuf.WireFormat.FieldType.MESSAGE,
                FansClubData.getDefaultInstance());
  }
  @SuppressWarnings("serial")
  private com.google.protobuf.MapField<
      Integer, FansClubData> preferData_;
  private com.google.protobuf.MapField<Integer, FansClubData>
  internalGetPreferData() {
    if (preferData_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          PreferDataDefaultEntryHolder.defaultEntry);
    }
    return preferData_;
  }
  public int getPreferDataCount() {
    return internalGetPreferData().getMap().size();
  }
  /**
   * <code>map&lt;int32, .FansClubData&gt; preferData = 2;</code>
   */
  @Override
  public boolean containsPreferData(
      int key) {

    return internalGetPreferData().getMap().containsKey(key);
  }
  /**
   * Use {@link #getPreferDataMap()} instead.
   */
  @Override
  @Deprecated
  public java.util.Map<Integer, FansClubData> getPreferData() {
    return getPreferDataMap();
  }
  /**
   * <code>map&lt;int32, .FansClubData&gt; preferData = 2;</code>
   */
  @Override
  public java.util.Map<Integer, FansClubData> getPreferDataMap() {
    return internalGetPreferData().getMap();
  }
  /**
   * <code>map&lt;int32, .FansClubData&gt; preferData = 2;</code>
   */
  @Override
  public /* nullable */
FansClubData getPreferDataOrDefault(
      int key,
      /* nullable */
FansClubData defaultValue) {

    java.util.Map<Integer, FansClubData> map =
        internalGetPreferData().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   * <code>map&lt;int32, .FansClubData&gt; preferData = 2;</code>
   */
  @Override
  public FansClubData getPreferDataOrThrow(
      int key) {

    java.util.Map<Integer, FansClubData> map =
        internalGetPreferData().getMap();
    if (!map.containsKey(key)) {
      throw new IllegalArgumentException();
    }
    return map.get(key);
  }

  private byte memoizedIsInitialized = -1;
  @Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(1, getData());
    }
    com.google.protobuf.GeneratedMessageV3
      .serializeIntegerMapTo(
        output,
        internalGetPreferData(),
        PreferDataDefaultEntryHolder.defaultEntry,
        2);
    getUnknownFields().writeTo(output);
  }

  @Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, getData());
    }
    for (java.util.Map.Entry<Integer, FansClubData> entry
         : internalGetPreferData().getMap().entrySet()) {
      com.google.protobuf.MapEntry<Integer, FansClubData>
      preferData__ = PreferDataDefaultEntryHolder.defaultEntry.newBuilderForType()
          .setKey(entry.getKey())
          .setValue(entry.getValue())
          .build();
      size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, preferData__);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @Override
  public boolean equals(final Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof FansClub)) {
      return super.equals(obj);
    }
    FansClub other = (FansClub) obj;

    if (hasData() != other.hasData()) return false;
    if (hasData()) {
      if (!getData()
          .equals(other.getData())) return false;
    }
    if (!internalGetPreferData().equals(
        other.internalGetPreferData())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (hasData()) {
      hash = (37 * hash) + DATA_FIELD_NUMBER;
      hash = (53 * hash) + getData().hashCode();
    }
    if (!internalGetPreferData().getMap().isEmpty()) {
      hash = (37 * hash) + PREFERDATA_FIELD_NUMBER;
      hash = (53 * hash) + internalGetPreferData().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static FansClub parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static FansClub parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static FansClub parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static FansClub parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static FansClub parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static FansClub parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static FansClub parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static FansClub parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public static FansClub parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static FansClub parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static FansClub parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static FansClub parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(FansClub prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @Override
  protected Builder newBuilderForType(
      BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code FansClub}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:FansClub)
      FansClubOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return Douyin.internal_static_FansClub_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
        int number) {
      switch (number) {
        case 2:
          return internalGetPreferData();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
        int number) {
      switch (number) {
        case 2:
          return internalGetMutablePreferData();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @Override
    protected FieldAccessorTable
        internalGetFieldAccessorTable() {
      return Douyin.internal_static_FansClub_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              FansClub.class, Builder.class);
    }

    // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.FansClub.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getDataFieldBuilder();
      }
    }
    @Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      data_ = null;
      if (dataBuilder_ != null) {
        dataBuilder_.dispose();
        dataBuilder_ = null;
      }
      internalGetMutablePreferData().clear();
      return this;
    }

    @Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return Douyin.internal_static_FansClub_descriptor;
    }

    @Override
    public FansClub getDefaultInstanceForType() {
      return FansClub.getDefaultInstance();
    }

    @Override
    public FansClub build() {
      FansClub result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @Override
    public FansClub buildPartial() {
      FansClub result = new FansClub(this);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartial0(FansClub result) {
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.data_ = dataBuilder_ == null
            ? data_
            : dataBuilder_.build();
        to_bitField0_ |= 0x00000001;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.preferData_ = internalGetPreferData().build(PreferDataDefaultEntryHolder.defaultEntry);
      }
      result.bitField0_ |= to_bitField0_;
    }

    @Override
    public Builder clone() {
      return super.clone();
    }
    @Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.setField(field, value);
    }
    @Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.addRepeatedField(field, value);
    }
    @Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof FansClub) {
        return mergeFrom((FansClub)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(FansClub other) {
      if (other == FansClub.getDefaultInstance()) return this;
      if (other.hasData()) {
        mergeData(other.getData());
      }
      internalGetMutablePreferData().mergeFrom(
          other.internalGetPreferData());
      bitField0_ |= 0x00000002;
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @Override
    public final boolean isInitialized() {
      return true;
    }

    @Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10: {
              input.readMessage(
                  getDataFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000001;
              break;
            } // case 10
            case 18: {
              com.google.protobuf.MapEntry<Integer, FansClubData>
              preferData__ = input.readMessage(
                  PreferDataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
              internalGetMutablePreferData().ensureBuilderMap().put(
                  preferData__.getKey(), preferData__.getValue());
              bitField0_ |= 0x00000002;
              break;
            } // case 18
            default: {
              if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                done = true; // was an endgroup tag
              }
              break;
            } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }
    private int bitField0_;

    private FansClubData data_;
    private com.google.protobuf.SingleFieldBuilderV3<
        FansClubData, FansClubData.Builder, FansClubDataOrBuilder> dataBuilder_;
    /**
     * <code>.FansClubData data = 1;</code>
     * @return Whether the data field is set.
     */
    public boolean hasData() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <code>.FansClubData data = 1;</code>
     * @return The data.
     */
    public FansClubData getData() {
      if (dataBuilder_ == null) {
        return data_ == null ? FansClubData.getDefaultInstance() : data_;
      } else {
        return dataBuilder_.getMessage();
      }
    }
    /**
     * <code>.FansClubData data = 1;</code>
     */
    public Builder setData(FansClubData value) {
      if (dataBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        data_ = value;
      } else {
        dataBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * <code>.FansClubData data = 1;</code>
     */
    public Builder setData(
        FansClubData.Builder builderForValue) {
      if (dataBuilder_ == null) {
        data_ = builderForValue.build();
      } else {
        dataBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * <code>.FansClubData data = 1;</code>
     */
    public Builder mergeData(FansClubData value) {
      if (dataBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0) &&
          data_ != null &&
          data_ != FansClubData.getDefaultInstance()) {
          getDataBuilder().mergeFrom(value);
        } else {
          data_ = value;
        }
      } else {
        dataBuilder_.mergeFrom(value);
      }
      if (data_ != null) {
        bitField0_ |= 0x00000001;
        onChanged();
      }
      return this;
    }
    /**
     * <code>.FansClubData data = 1;</code>
     */
    public Builder clearData() {
      bitField0_ = (bitField0_ & ~0x00000001);
      data_ = null;
      if (dataBuilder_ != null) {
        dataBuilder_.dispose();
        dataBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * <code>.FansClubData data = 1;</code>
     */
    public FansClubData.Builder getDataBuilder() {
      bitField0_ |= 0x00000001;
      onChanged();
      return getDataFieldBuilder().getBuilder();
    }
    /**
     * <code>.FansClubData data = 1;</code>
     */
    public FansClubDataOrBuilder getDataOrBuilder() {
      if (dataBuilder_ != null) {
        return dataBuilder_.getMessageOrBuilder();
      } else {
        return data_ == null ?
            FansClubData.getDefaultInstance() : data_;
      }
    }
    /**
     * <code>.FansClubData data = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        FansClubData, FansClubData.Builder, FansClubDataOrBuilder>
        getDataFieldBuilder() {
      if (dataBuilder_ == null) {
        dataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            FansClubData, FansClubData.Builder, FansClubDataOrBuilder>(
                getData(),
                getParentForChildren(),
                isClean());
        data_ = null;
      }
      return dataBuilder_;
    }

    private static final class PreferDataConverter implements com.google.protobuf.MapFieldBuilder.Converter<Integer, FansClubDataOrBuilder, FansClubData> {
      @Override
      public FansClubData build(FansClubDataOrBuilder val) {
        if (val instanceof FansClubData) { return (FansClubData) val; }
        return ((FansClubData.Builder) val).build();
      }

      @Override
      public com.google.protobuf.MapEntry<Integer, FansClubData> defaultEntry() {
        return PreferDataDefaultEntryHolder.defaultEntry;
      }
    };
    private static final PreferDataConverter preferDataConverter = new PreferDataConverter();

    private com.google.protobuf.MapFieldBuilder<
        Integer, FansClubDataOrBuilder, FansClubData, FansClubData.Builder> preferData_;
    private com.google.protobuf.MapFieldBuilder<Integer, FansClubDataOrBuilder, FansClubData, FansClubData.Builder>
        internalGetPreferData() {
      if (preferData_ == null) {
        return new com.google.protobuf.MapFieldBuilder<>(preferDataConverter);
      }
      return preferData_;
    }
    private com.google.protobuf.MapFieldBuilder<Integer, FansClubDataOrBuilder, FansClubData, FansClubData.Builder>
        internalGetMutablePreferData() {
      if (preferData_ == null) {
        preferData_ = new com.google.protobuf.MapFieldBuilder<>(preferDataConverter);
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return preferData_;
    }
    public int getPreferDataCount() {
      return internalGetPreferData().ensureBuilderMap().size();
    }
    /**
     * <code>map&lt;int32, .FansClubData&gt; preferData = 2;</code>
     */
    @Override
    public boolean containsPreferData(
        int key) {

      return internalGetPreferData().ensureBuilderMap().containsKey(key);
    }
    /**
     * Use {@link #getPreferDataMap()} instead.
     */
    @Override
    @Deprecated
    public java.util.Map<Integer, FansClubData> getPreferData() {
      return getPreferDataMap();
    }
    /**
     * <code>map&lt;int32, .FansClubData&gt; preferData = 2;</code>
     */
    @Override
    public java.util.Map<Integer, FansClubData> getPreferDataMap() {
      return internalGetPreferData().getImmutableMap();
    }
    /**
     * <code>map&lt;int32, .FansClubData&gt; preferData = 2;</code>
     */
    @Override
    public /* nullable */
FansClubData getPreferDataOrDefault(
        int key,
        /* nullable */
FansClubData defaultValue) {

      java.util.Map<Integer, FansClubDataOrBuilder> map = internalGetMutablePreferData().ensureBuilderMap();
      return map.containsKey(key) ? preferDataConverter.build(map.get(key)) : defaultValue;
    }
    /**
     * <code>map&lt;int32, .FansClubData&gt; preferData = 2;</code>
     */
    @Override
    public FansClubData getPreferDataOrThrow(
        int key) {

      java.util.Map<Integer, FansClubDataOrBuilder> map = internalGetMutablePreferData().ensureBuilderMap();
      if (!map.containsKey(key)) {
        throw new IllegalArgumentException();
      }
      return preferDataConverter.build(map.get(key));
    }
    public Builder clearPreferData() {
      bitField0_ = (bitField0_ & ~0x00000002);
      internalGetMutablePreferData().clear();
      return this;
    }
    /**
     * <code>map&lt;int32, .FansClubData&gt; preferData = 2;</code>
     */
    public Builder removePreferData(
        int key) {

      internalGetMutablePreferData().ensureBuilderMap()
          .remove(key);
      return this;
    }
    /**
     * Use alternate mutation accessors instead.
     */
    @Deprecated
    public java.util.Map<Integer, FansClubData>
        getMutablePreferData() {
      bitField0_ |= 0x00000002;
      return internalGetMutablePreferData().ensureMessageMap();
    }
    /**
     * <code>map&lt;int32, .FansClubData&gt; preferData = 2;</code>
     */
    public Builder putPreferData(
        int key,
        FansClubData value) {

      if (value == null) { throw new NullPointerException("map value"); }
      internalGetMutablePreferData().ensureBuilderMap()
          .put(key, value);
      bitField0_ |= 0x00000002;
      return this;
    }
    /**
     * <code>map&lt;int32, .FansClubData&gt; preferData = 2;</code>
     */
    public Builder putAllPreferData(
        java.util.Map<Integer, FansClubData> values) {
      for (java.util.Map.Entry<Integer, FansClubData> e : values.entrySet()) {
        if (e.getKey() == null || e.getValue() == null) {
          throw new NullPointerException();
        }
      }
      internalGetMutablePreferData().ensureBuilderMap()
          .putAll(values);
      bitField0_ |= 0x00000002;
      return this;
    }
    /**
     * <code>map&lt;int32, .FansClubData&gt; preferData = 2;</code>
     */
    public FansClubData.Builder putPreferDataBuilderIfAbsent(
        int key) {
      java.util.Map<Integer, FansClubDataOrBuilder> builderMap = internalGetMutablePreferData().ensureBuilderMap();
      FansClubDataOrBuilder entry = builderMap.get(key);
      if (entry == null) {
        entry = FansClubData.newBuilder();
        builderMap.put(key, entry);
      }
      if (entry instanceof FansClubData) {
        entry = ((FansClubData) entry).toBuilder();
        builderMap.put(key, entry);
      }
      return (FansClubData.Builder) entry;
    }
    @Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:FansClub)
  }

  // @@protoc_insertion_point(class_scope:FansClub)
  private static final FansClub DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new FansClub();
  }

  public static FansClub getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<FansClub>
      PARSER = new com.google.protobuf.AbstractParser<FansClub>() {
    @Override
    public FansClub parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      Builder builder = newBuilder();
      try {
        builder.mergeFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(builder.buildPartial());
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e)
            .setUnfinishedMessage(builder.buildPartial());
      }
      return builder.buildPartial();
    }
  };

  public static com.google.protobuf.Parser<FansClub> parser() {
    return PARSER;
  }

  @Override
  public com.google.protobuf.Parser<FansClub> getParserForType() {
    return PARSER;
  }

  @Override
  public FansClub getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

